<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Dwoo_ITemplate</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Interface Dwoo_ITemplate</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">interface that represents a dwoo template</p>
<p class="description"><p>This software is provided 'as-is', without any express or implied warranty.  In no event will the authors be held liable for any damages arising from the use of this software.</p><p>This file is released under the LGPL  &quot;GNU Lesser General Public License&quot;  More information can be found here:  <a href="http://www.gnu.org/copyleft/lesser.html">http://www.gnu.org/copyleft/lesser.html</a></p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Jordi Boggiano &lt;<a href="mailto:j.boggiano@seld.be">j.boggiano@seld.be</a>&gt;</li>
				<li><span class="field">version:</span> 0.9.1</li>
				<li><span class="field">copyright:</span> Copyright (c) 2008, Jordi Boggiano</li>
				<li><span class="field">link:</span> <a href="http://dwoo.org/">http://dwoo.org/</a></li>
				<li><span class="field">date:</span> 2008-05-30</li>
				<li><span class="field">license:</span> <a href="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Dwoo---ITemplate.php.html">/Dwoo/ITemplate.php</a> (line <span class="field"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a22">22</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																										
				<div class="method-definition">
					static 						<span class="method-result"><a href="../Dwoo/Dwoo_ITemplate.html">Dwoo_ITemplate</a>|null|false</span>
										<a href="#templateFactory" title="details" class="method-name">templateFactory</a>
											(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$resourceId</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$cacheTime</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$cacheId</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$compileId</span> = <span class="var-default">null</span>])
									</div>
																		
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cache" title="details" class="method-name">cache</a>
											(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$output</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#clearCache" title="details" class="method-name">clearCache</a>
											(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$olderThan</span> = <span class="var-default">-1</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|bool</span>
										<a href="#getCachedTemplate" title="details" class="method-name">getCachedTemplate</a>
											(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">int|null</span>
										<a href="#getCacheTime" title="details" class="method-name">getCacheTime</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getCompiledTemplate" title="details" class="method-name">getCompiledTemplate</a>
											(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, [<span class="var-type"><a href="../Dwoo/Dwoo_ICompiler.html">Dwoo_ICompiler</a></span>&nbsp;<span class="var-name">$compiler</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Dwoo/Dwoo_ICompiler.html">Dwoo_ICompiler</a></span>
										<a href="#getCompiler" title="details" class="method-name">getCompiler</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getName" title="details" class="method-name">getName</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|false</span>
										<a href="#getResourceIdentifier" title="details" class="method-name">getResourceIdentifier</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getResourceName" title="details" class="method-name">getResourceName</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getSource" title="details" class="method-name">getSource</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getUid" title="details" class="method-name">getUid</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setCacheTime" title="details" class="method-name">setCacheTime</a>
											([<span class="var-type">int</span>&nbsp;<span class="var-name">$seconds</span> = <span class="var-default">null</span>])
									</div>
																			</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodtemplateFactory" id="templateFactory"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static templateFactory</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a138">138</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns a new template object from the given include name, null if no include is  possible (resource not found), or false if include is not permitted by this resource type</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result"><a href="../Dwoo/Dwoo_ITemplate.html">Dwoo_ITemplate</a>|null|false</span>
		<span class="method-name">
			templateFactory
		</span>
					(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$resourceId</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$cacheTime</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$cacheId</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$compileId</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$resourceId</span><span class="var-description">: the resource identifier</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$cacheTime</span><span class="var-description">: duration of the cache validity for this template,                           if null it defaults to the Dwoo instance that will                           render this template</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$cacheId</span><span class="var-description">: the unique cache identifier of this page or anything else that                            makes this template's content unique, if null it defaults                            to the current url</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$compileId</span><span class="var-description">: the unique compiled identifier, which is used to distinguish this                              template from others, if null it defaults to the filename+bits of the path</span>			</li>
					<li>
				<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>
				<span class="var-name">$dwoo</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcache" id="cache"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">cache</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a60">60</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">caches the provided output into the cache file</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cache
		</span>
					(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$output</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>
				<span class="var-name">$dwoo</span><span class="var-description">: the dwoo instance that requests it</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$output</span><span class="var-description">: the template output</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclearCache" id="clearCache"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">clearCache</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a69">69</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">clears the cached template if it's older than the given time</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if the cache was not present or if it was deleted, false if it remains there</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			clearCache
		</span>
					(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$olderThan</span> = <span class="var-default">-1</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>
				<span class="var-name">$dwoo</span><span class="var-description">: the dwoo instance that was used to cache that template</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$olderThan</span><span class="var-description">: minimum time (in seconds) required for the cache to be cleared</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetCachedTemplate" id="getCachedTemplate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getCachedTemplate</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a52">52</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the cached template output file name, true if it's cache-able but not cached  or false if it's not cached</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|bool</span>
		<span class="method-name">
			getCachedTemplate
		</span>
					(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>
				<span class="var-name">$dwoo</span><span class="var-description">: the dwoo instance that requests it</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetCacheTime" id="getCacheTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getCacheTime</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a31">31</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the cache duration for this template</p>
<p class="description"><p>defaults to null if it was not provided</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int|null</span>
		<span class="method-name">
			getCacheTime
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetCompiledTemplate" id="getCompiledTemplate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getCompiledTemplate</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a78">78</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the compiled template file name</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getCompiledTemplate
		</span>
					(<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>&nbsp;<span class="var-name">$dwoo</span>, [<span class="var-type"><a href="../Dwoo/Dwoo_ICompiler.html">Dwoo_ICompiler</a></span>&nbsp;<span class="var-name">$compiler</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Dwoo/Dwoo.html">Dwoo</a></span>
				<span class="var-name">$dwoo</span><span class="var-description">: the dwoo instance that requests it</span>			</li>
					<li>
				<span class="var-type"><a href="../Dwoo/Dwoo_ICompiler.html">Dwoo_ICompiler</a></span>
				<span class="var-name">$compiler</span><span class="var-description">: the compiler that must be used</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetCompiler" id="getCompiler"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getCompiler</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a121">121</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the compiler used by this template, if it was just compiled, or null</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Dwoo/Dwoo_ICompiler.html">Dwoo_ICompiler</a></span>
		<span class="method-name">
			getCompiler
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetName" id="getName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getName</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a85">85</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the template name</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getName
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetResourceIdentifier" id="getResourceIdentifier"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getResourceIdentifier</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a99">99</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the resource identifier for this template or false if it has no identifier</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|false</span>
		<span class="method-name">
			getResourceIdentifier
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetResourceName" id="getResourceName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getResourceName</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a92">92</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the resource name for this template class</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getResourceName
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetSource" id="getSource"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getSource</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a106">106</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the template source of this template</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getSource
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetUid" id="getUid"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getUid</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a114">114</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns an unique string identifying the current version of this template,  for example a timestamp of the last modified date or a hash of the template source</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getUid
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetCacheTime" id="setCacheTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setCacheTime</span> (line <span class="line-number"><a href="../__filesource/fsource_Dwoo__DwooITemplate.php.html#a43">43</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">sets the cache duration for this template</p>
<p class="description"><p>can be used to set it after the object is created if you did not provide  it in the constructor</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setCacheTime
		</span>
					([<span class="var-type">int</span>&nbsp;<span class="var-name">$seconds</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$seconds</span><span class="var-description">: duration of the cache validity for this template, if  null it defaults to the Dwoo instance's cache time. 0 = disable and  -1 = infinite cache</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 30 May 2008 04:51:43 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>